import request from "@/utils/request"

export function getArticleList(data) {
    return request({
        url: '/blog/article/list',
        method: 'post',
        data
    })
}

export function getArticleInfo(id) {
    return request({
        url: '/blog/article/info?id=' + id,
        method: 'get'
    })
}

export function saveArticleInfo(data) {
    return request({
        url: '/blog/article/save',
        method: 'post',
        data
    })
}

export function deleteArticleInfo(id) {
    return request({
        url: '/blog/article/delete?id=' + id,
        method: 'delete'
    })
}

export function getArticleTags() {
    return request({
        url: '/blog/article/tags',
        method: 'get'
    })
}

export function saveArticleTagInfo(name) {
    return request({
        url: '/blog/article/saveTag?name=' + name,
        method: 'post'
    })
}
export function deleteArticleTag(name) {
    return request({
        url: '/blog/article/deleteTag?name=' + name,
        method: 'delete'
    })
}